import {ConfigProvider} from 'ant-design-vue'
import zhCN from 'ant-design-vue/es/locale/zh_CN'
import dayjs from 'dayjs'
import 'dayjs/locale/zh-cn'
import './App.less'
import figlet from 'figlet'
import standard from 'figlet/importable-fonts/Standard.js'
dayjs.locale('zh-cn')

export default defineComponent({
  name: 'App',

  setup() {
    onMounted(() => {
      //  console.log(
      //    '%c 产品介绍',
      //    'background:#fe7866;padding:10px 10px 10px 2px;font-size:20px;color:white;font-weight:700;'
      //  )

      console.log(
        `%c欢迎来到恒蓝云在线平台!`,
        'background:#3b7dda; padding: 10px; border-radius: 15px;  color: #fff;font-size:30px;'
      )

      figlet.parseFont('黑体', standard)
      figlet.text(
        'Welcome To ConstantBlue Cloud Web User !',
        {
          font: '黑体'
        },
        function (err: any, data: any) {
          console.log(data)
        }
      )
    })
    return () => (
      <ConfigProvider locale={zhCN}>
        <routerView />
      </ConfigProvider>
    )
  }
})
